package classPractice;

public class Point {
    int x;
    int y;
    Point(){
        x = 1;
        y = 2;
    }
    Point(int a,int b){
        x = a;
        y = b;
    }
    void show(){
        System.out.println(this.x);
        this.grow();
    }
    void grow(){
        this.x++;
    }
    Point getThis(){
        return this;
    }
    public static void main(String[] arg){
        Point obj = new Point();
        Point obj2 = new Point(5,5);
        System.out.println(obj.x+ obj.y+obj2.x+obj2.y);
        obj.show();
        obj.show();
        obj.show();
        System.out.println(obj.getThis());
        obj.getThis().show();

        Person person1 = new Person();
        person1.setName("我是闫坤");
        System.out.println(person1.getName());
    }
}
